{% extends "house/base.html" %}
{% block title %}{% endblock %}
{% block content_title %}{% endblock %}

{% block sub_menu %}
<li><a href="{% url current_month %}">Текущий месяц</a></li>
{% endblock %} 

{% block mainmenuitem_1 %}class="mainMenuSelectedItem"{% endblock %}

{% block main %}





<h2>Квартира {{ apartment.number }}</h2>


<form method="post" action="." name="form" id="apartment_property">
    <div>
        <fieldset class="aligned">
        {% for field in form %}
            <div class="form-row">
                {{ field.errors }}
                <div>
                    {{ field.label_tag }}
                    {{ field }}&nbsp;&nbsp;{% if field.field.required %}<font color="red">*</font>{% endif %}
                </div>
            </div>
        {% endfor %}
        </fieldset>
        <div>
            <input class="default" type="submit" name="_save" value="Сохранить"/>
        </div>
    </div>
</form>


<div class="floats">

<table>
  <tr>
    <th>Дата</th>
    <th>Сумма</th>
    <th>Период</th>
    <th></th>
  </tr>
  {% for item in apartment_payment_list %}
  <tr>
    <td>{{ item.data|date:"d.m.Y" }}</td>
    <td>{{ item.amount }} р.</td>
    <td>{{ item.data|date:"m.Y" }}</td>
    <td>          <a href="{% url delete_payment item.id %}"  title="Удалить платеж"
          OnClick="return confDelete('{{ apartment.id }}', '{{ apartment.number }}');">
          <img src="{% load media %}{% media_prefix %}img/house-abort-a.gif" width="14" height="14">
          </a></td>
  </tr>   
  {% endfor %} 
</table>
   
</div>

{% endblock %}
